
import lessModule from "./index.module.less"
import HomePage_ModalComponent_NormalFooterComponent from "../../../../../../component/modal/component/normalFooter"
import HomePage_ModalComponent_HeaderNormalComponent from "../../../../../../component/modal/component/headerNormal"

// 主页-数据维护页面-定检数据维护页面-新增或编辑弹窗组件
interface homePageDataMaintenancePageMaintenanceScheduledInspectionDataPageSeeModalComponentInterface {
    modalData: object
    change_cancel: Function
}
const HomePage_DataMaintenancePage_MaintenanceScheduledInspectionDataPage_SeeModalComponent: React.FC<homePageDataMaintenancePageMaintenanceScheduledInspectionDataPageSeeModalComponentInterface> = (props) => {

    const rowList = [
        [
            {
                label: "维护时间",
                key: "maintainTime",
            },

        ],
        [
            {
                label: "巡回中心",
                key: "maintainCentre",
            },
            {
                label: "安装站点",
                key: "stationName",
            },
            {
                label: "调度编号",
                key: "dispatchNumber",
            },
            {
                label: "装置厂家",
                key: "deviceFac",
            },
            {
                label: "装置型号",
                key: "deviceModel",
            },

        ],
        [
            {
                label: "定检周期",
                key: "inspectionCycle",
            },
            {
                label: "维护班组",
                key: "maintainTeam",
            },
            {
                label: "维护负责人",
                key: "maintainPerson",
            },
        ],
    ]




    return (
        <div className={lessModule["homePageDataMaintenancePageMaintenanceScheduledInspectionDataPageSeeModalComponent"]}>
            <HomePage_ModalComponent_HeaderNormalComponent name="维护记录" padding="15px 24px" change_cancel={props.change_cancel} />
            <main className={lessModule["homePageDataMaintenancePageMaintenanceScheduledInspectionDataPageSeeModalComponent-main"]}>
                {
                    rowList.map((item, idx) => (
                        <div key={`rowItem${idx}`} className={lessModule["homePageDataMaintenancePageMaintenanceScheduledInspectionDataPageSeeModalComponent-main__row"]}>
                            {
                                item.map((item, idx) => (
                                    <div key={`rowItemItem${idx}`} className={lessModule["main-row__group"]}>
                                        <span>{item["label"]}：</span>
                                        <span className={lessModule["row-group__value"]}>{props.modalData[item.key]}</span>
                                    </div>
                                ))
                            }
                        </div>
                    ))
                }
                <img className={lessModule["homePageDataMaintenancePageMaintenanceScheduledInspectionDataPageSeeModalComponent-main__image"]} src={props.modalData["picture"]}/>
            </main>
            <HomePage_ModalComponent_NormalFooterComponent change_cancel={props.change_cancel} />
        </div>
    )
}
export default HomePage_DataMaintenancePage_MaintenanceScheduledInspectionDataPage_SeeModalComponent